Moving object

by: Hillary, 9 years ago


Traceback (most recent call last):
  File "C:/Python27/test/raceyver2.py", line 209, in <module>
    game_start()
  File "C:/Python27/test/raceyver2.py", line 108, in game_start
    button("Start!",150,450,100,50,green,bright_green,game_loop)
  File "C:/Python27/test/raceyver2.py", line 75, in button
    action()
  File "C:/Python27/test/raceyver2.py", line 160, in game_loop
    if event.type == pygame.KEYDOWN:
UnboundLocalError: local variable 'event' referenced before assignment



You must be logged in to post. Please login or register an account.



So far, all we know is event is referenced before any sort of definition of what it is. Usually, event is in a loop, like for event in pygame.event.get().

Maybe you've typoed or something.

-Harrison 9 years ago

You must be logged in to post. Please login or register an account.